<template>
	<view class="flex-col page">
		<u-navbar title="我的邀请" :autoBack="true" bgColor="#fff" placeholder="true"></u-navbar>
		<view class="mt-8 flex-col justify-start section_2">
			<view class="flex-col list">
				<view class="flex-row items-center list-item" v-for="(item, index) in list" :key="index">
					<image class="image" :src="$util.img(item.avatar)" />
					<view class="flex-col items-start flex-1 ml-11-5">
						<text class="font text">{{item.nickname}}</text>
						<text class="font_2 text mt-15-5">{{item.mobile}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		props: {},
		data() {
			return {
				userInfo: [],
				list: [],
			};
		},
		onLoad() {
			this.userInfo = uni.getStorageSync('userInfo');
			this.getList();
		},
		methods: {
			getList() {
				this.$api.sendRequest({
					url: '/api/index/getXiaji',
					data: {
						user_id: this.userInfo.id,
					},
					success: res => {
						console.log(res.data)
						if (res.code == 1) {
							this.list = res.data;
						}
					}
				});
			},
		},
	};
</script>

<style scoped lang="scss">
	.ml-11-5 {
		margin-left: 23rpx;
	}

	.mt-15-5 {
		margin-top: 31rpx;
	}

	.page {
		background-color: #f5f5f5;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;

		.section {
			padding: 34rpx 0 20rpx;
			background-color: #ffffff;

			.text-wrapper {
				margin-left: 32rpx;
				margin-right: 10rpx;
				padding: 96rpx 0 18rpx;
				background-image: url('https://www.dlxx.top/static/images/05e0093ead41b70437e3214e578e2e5a.png');
				background-size: 100% 100%;
				background-repeat: no-repeat;

				.text_2 {
					line-height: 27rpx;
				}
			}
		}

		.section_2 {
			margin: 0 10rpx;
			padding: 19rpx 0;
			background-color: #ffffff;
			border-radius: 10rpx 10rpx 0 0;

			.list {
				margin: 0 39rpx;

				.list-item {
					padding: 24rpx 0;
					border-bottom: solid 3rpx #eeeeee;

					.image {
						width: 80rpx;
						height: 80rpx;
					}

					.font_2 {
						font-size: 24rpx;
						font-family: PingFangSC;
						line-height: 19rpx;
						color: #000000;
					}
				}
			}
		}

		.font {
			font-size: 28rpx;
			font-family: PingFangSC;
			line-height: 26rpx;
			color: #00140d;
		}

		.text {
			text-transform: uppercase;
		}
	}
</style>